package com.zyk.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 资源
 * </p>
 *
 * @author feifeimao
 * @since 2017-11-20
 */
@Data
public class Resource extends Model<Resource> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 资源名称
     */
	private String name;
    /**
     * 资源路径
     */
	private String url;
    /**
     * 打开方式 ajax,iframe
     */
	@TableField("open_mode")
	private String openMode;
    /**
     * 资源介绍
     */
	private String description;
    /**
     * 资源图标
     */
	private String icon;
    /**
     * 父级资源id
     */
	private Long pid;
    /**
     * 排序
     */
	private Integer seq;
    /**
     * 状态
     */
	private Integer status;
    /**
     * 打开状态
     */
	private Integer opened;
    /**
     * 资源类别
     */
	@TableField("resource_type")
	private Integer resourceType;
    /**
     * 创建时间
     */
	@TableField("create_time")
	private Date createTime;

	protected Serializable pkVal() {
		return null;
	}

	public Resource(Long id, String name, String url, String openMode, String description, String icon, Long pid, Integer seq, Integer status, Integer opened, Integer resourceType, Date createTime) {
		this.id = id;
		this.name = name;
		this.url = url;
		this.openMode = openMode;
		this.description = description;
		this.icon = icon;
		this.pid = pid;
		this.seq = seq;
		this.status = status;
		this.opened = opened;
		this.resourceType = resourceType;
		this.createTime = createTime;
	}

	public Resource() {
	}
}
